 #include<vector>
 #include<iostream>
 #include<algorithm>
 #include<unordered_set>
using namespace std;
 vector<vector<int>> threeSum(vector<int>& num)
 {
     vector<vector<int>> Vres;
     unordered_set<int> s;
     for (auto &e : num)
         s.insert(e);
     vector<int> nums;
     for (auto &e : s)
     {
         nums.push_back(e);
     }

     sort(nums.begin(), nums.end());
     for (int i = nums.size() - 1; i >= 0; i--)
     {
         int max = nums[i];
         int left = 0;
         int right = i - 1;
         vector<int> res;
         while (right > left)
         {
             int s = nums[right] + nums[left];
             if (s > (-max))
             {
                 left = 0;
                 right--;
             }
             else if (s < (-max))
             {
                 left++;
             }
             else
             {
                 vector<int> res = {nums[left], nums[right], max};
                 left++;
                 right--;
             }
         }
     }

     return Vres;
 }
int main()
{



    

}